package com.lidy.tankbattle.tankutils;

import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author lidy
 * @version V1.0
 * @classname ThreadUtil
 * @description 坦克线程工具
 * @date 2022/5/31 20:39
 */
public class ThreadUtil {
    /**
     * @author: lidy
     * @description: 线程池
     * @date: 2022/6/1 16:28
     */
    public static ThreadPoolExecutor threadPoolExecutor =
            new ThreadPoolExecutor(50, 100, 60, TimeUnit.SECONDS,
                    new LinkedBlockingDeque<>(30), Executors.defaultThreadFactory(), new ThreadPoolExecutor.CallerRunsPolicy());

}
